home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / GNU / gnuplot.lha / gnuplot / fitdemo / elastic < prev    next >
Encoding:
Text File  |  1993-06-08  |  2.0 KB  |  55 lines

  1. pause 0  ""
  2. pause 0  ""
  3. pause -1 "Now an example how to fit multi-branch functions  (-> return)"
  4. plot 'soundvel.dat'
  5. pause 0  "The model consists of two branches, the first describing longitudinal"
  6. pause 0  "sound velocity as function of propagation direction (upper data),"
  7. pause 0  "the second describing transverse sound velocity (lower data)."
  8. pause 0  ""
  9. pause 0  "The model uses these data in order to fit elastic stiffnesses"
  10. pause 0  "which occur differently in both branches."
  11. pause 0  ""
  12. pause -1 "(-> return)"
  13. load 'hexa.fnc'
  14. load 'sound.par'
  15. plot 'soundvel.dat', vlong(x), vtrans(x)
  16. fit f(x) 'soundvel.dat' 'sound.par'
  17. pause 0  ""
  18. pause -1 "(-> return)"
  19. plot 'soundvel.dat', vlong(x), vtrans(x)
  20. pause 0  "Look at the file 'hexa.fnc' to see how the branches are realized"
  21. pause 0  "using the internal variable FIT_INDEX"
  22. pause 0  ""
  23. pause 0  "Next we only use every fifth data point for fitting by setting the"
  24. pause 0  "variable FIT_SKIP to 4. Look at the fitting-speed increase and at"
  25. pause 0  "fitting result."
  26. pause 0  ""
  27. pause -1 "(-> return)"
  28. load 'sound.par'
  29. plot 'soundvel.dat', vlong(x), vtrans(x)
  30. FIT_SKIP = 4
  31. fit f(x) 'soundvel.dat' 'sound.par'
  32. plot 'soundvel.dat', vlong(x), vtrans(x)
  33. pause 0  "When you compare the results (see 'fit.log') you remark that"
  34. pause 0  "the uncertainties in the fitted constants have become larger,"
  35. pause 0  "the quality of the plot is only slightly affected."
  36. pause 0  ""
  37. pause 0  "By marking some parameters as '# FIXED' in the parameter file"
  38. pause 0  "you fit only the others (c44 and c13 fixed here)."
  39. pause 0  ""
  40. pause -1 "(-> return)"
  41. load 'sound2.par'
  42. plot 'soundvel.dat', vlong(x), vtrans(x)
  43. fit f(x) 'soundvel.dat' 'sound2.par'
  44. plot 'soundvel.dat', vlong(x), vtrans(x)
  45. pause 0  "This has the same effect as specifying only the real free"
  46. pause 0  "parameters by the 'via' syntax."
  47. pause 0  ""
  48. pause 0  "fit f(x) 'soundvel.dat' via c33, c11, phi0"
  49. pause 0  ""
  50. pause -1 "(-> return)"
  51. load 'sound.par'
  52. plot 'soundvel.dat', vlong(x), vtrans(x)
  53. fit f(x) 'soundvel.dat' via c33, c11, phi0
  54. plot 'soundvel.dat', vlong(x), vtrans(x)
  55.